package com.school.chapter01.homework;

public class DLinkedList_ {
    public Node first;
    public Node last;
    public boolean isEmpty(){
        return first == null;
    }
    public void print(){
        Node current = first;
        while (current != null){
            System.out.println("[" + current.date + "]");
            current = current.rnext;
        }
    }
}
class Node{
    int date ;
    Node rnext = null;
    Node lnext = null;

    public Node (int date){
        this.date = date;
        this.rnext = null;
        this.lnext = null;
    }
}